import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
public class SayHelloTest{
 public static void main(String [] args){
  try {
   String endpointURL ="http://localhost:8080/axis/SayHello.jws?method=hello";
   Service service = new Service();
   Call call = (Call) service.createCall();
   call.setTargetEndpointAddress(endpointURL);
   call.addParameter("test",XMLType.XSD_STRING,ParameterMode.IN);
   
  call.setOperationName("hello");

   call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
   System.out.println("-----");
   String ret = (String) call.invoke( new Object[] { new String("Hello world!") } );
   System.out.println("You typed : " + ret);
  } catch (Exception e) {
   System.err.println(e.toString());
  }
 }
}